<?php
define("EMAIL_LOCATION", "email");

class emailForm
{
	public static function test()
	{
		echo "hey";
	}
}
// Functions to retrive POST/GET
if (!function_exists('getContactEmail')) 
{
	function getContactEmail()
	{
		$CI = &get_instance();
		$email = $CI->input->post(EMAIL_LOCATION);
		if($email != null)
		{
			return $email;
		}
		return null;
	}
}

if (!function_exists('getHeadlineEmail')) 
{
	function getHeadlineEmail()
	{
		$CI = &get_instance();
		$headline = $CI->input->post('headlineEmail');
		if($headline != null)
		{
			return $headline;
		}
		return null;
	}
}

if (!function_exists('getMessageEmail')) 
{
	function getMessageEmail()
	{
		$CI = &get_instance();
		$message = $CI->input->post('messageEmail');
		if($message != null)
		{
			return $message;
		}
		return null;
	}
}

// Functions to define urls and titles for the masterpage
if (!function_exists('getContactViewUrl'))
{
	function getContactViewUrl()
	{
		return "contact/contact";
	}
}

if (!function_exists('getContactViewTitle'))
{
	function getContactViewTitle()
	{
		return "Contact";
	}
}

if (!function_exists('getContactViewSuccessUrl'))
{
	function getContactViewSuccessUrl()
	{
		return "contact/success";
	}
}

if (!function_exists('getContactViewSuccessTitle'))
{
	function getContactViewSuccessTitle()
	{
		return "Thanks for your message!";
	}
}

if (!function_exists('getContactCtrlBase'))
{
	function getContactCtrlBase()
	{
		return "contact/index";
	}
}
